package popcorn.ticket.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import popcorn.ticket.entity.Ticket;
import popcorn.ticket.entity.TicketExample;

@Repository
public interface TicketMapper {
    long countByExample(TicketExample example);

    int deleteByExample(TicketExample example);

    int deleteByPrimaryKey(Integer ticketid);

    int insert(Ticket record);

    int insertSelective(Ticket record);

    List<Ticket> selectByExample(TicketExample example);

    Ticket selectByPrimaryKey(Integer ticketid);

    int updateByExampleSelective(@Param("record") Ticket record, @Param("example") TicketExample example);

    int updateByExample(@Param("record") Ticket record, @Param("example") TicketExample example);

    int updateByPrimaryKeySelective(Ticket record);
    
    int updateByPrimaryKey(Ticket record);
  //动态查询所有
    List<Ticket> selectAll(@Param("ticketid")Integer ticketid,@Param("startdate")String startdate,@Param("enddate")String enddate,@Param("selstatus")int selstatus);
    //获取全部的观影人数
    List<Ticket> selectAllNum();
    //获取今日观影数
    Ticket sltWatchNowNum();
    //查询单个用户的影票信息
    List<Ticket> selectTicketByUserid(Integer userid);
    //退款后修改影票状态
    int updRefundTicket(Ticket t);
    //根据订单编号获取影票信息
    List<Ticket> selTicketByOrderid(int orderid);
    //根据排期编号获取影票信息
    List<Ticket> selTicketByScheduleid(int scheduleid);
}